<%-- 
    Document   : jQueryForm
    Created on : 29 ??.?. 2554, 14:18:11
    Author     : CHANWUT
--%>

<script type="text/javascript">
    $(document).ready(function() {
        $("#txtPhone").mask("999-9999-999");
        $("#formSample").form().validate({
             submitHandler: function(form) {
                 alert("after submit");
                $(form).ajaxSubmit();
            }
        });
    });


</script>

<form id="formSample" action="a.jsp" method="GET">
    <fieldset>
        <legend>Search</legend>
        <table>
            <tr>
                <td>Enter Name</td>
                <td>
                    <input type="text" name="txtName" id="txtName" class="required" value=""  />
                </td>
            </tr>
            <tr>
                <td>Your Phone</td>
                <td>
                    <input type="text" name="txtPhone" id="txtPhone" class="" value="" />
                </td>
            </tr>
            <tr>
                <td>It has a Datepicker</td>
                <td>
                    <input type="text" name="datDate" id="datDate" class="date" value="" />
                </td>
            </tr>

            <tr>
                <td valign="top">Programming language</td>
                <td>
                    <input type="checkbox" name="language" value="java" />Java<br />
                    <input type="checkbox" name="language" value="php" />PHP<br />
                    <input type="checkbox" name="language" value="javascript" />Javascript<br />
                    <input type="checkbox" name="language" value="html/css" />HTML/CSS
                </td>
            </tr>

            <tr>
                <td valign="top">Job title</td>
                <td>
                    <input type="radio" name="choice" value="1" /> Web Developer<br />
                    <input type="radio" name="choice" value="2" /> Web Designer<br />
                    <input type="radio" name="choice" value="3" /> UI/UE Developer<br />
                    <input type="radio" name="choice" value="4" /> Tester
                </td>
            </tr>

            <tr>
                <td>Experience</td>
                <td>
                    <select name ="year">
                        <option selected="selected">Fresher</option>
                        <option>&lt;1 year</option>
                        <option>1-2 years</option>
                        <option>2-3 years</option>
                        <option>3-4 years</option>
                        <option>4-5 years</option>
                        <option>5-6 years</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>Tell Us about Yourself </td>
                <td>
                    <textarea name="txt_self"></textarea>
                </td>
            </tr>
            <tr>
                <td></td>
                <td><input type="reset" value="reset" /><input type="submit" value="Enter" /></td>
            </tr>
        </table>
    </fieldset>
</form>